Allow disabling remote method after initialize explorer - #157
Conversation
|
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
| var paths = Object.keys(res.body.paths); | ||
| expect(paths).to.not.contain('/products/findOne'); | ||
| }); | ||
| done(); |
There was a problem hiding this comment.
move this done after the above expect.
expect(paths)...
done();
|
@supasate Two things to fix, otherwise LGTM. |
|
|
||
| // listening to remoteMethodDisabled event for updating the swaggerObject | ||
| // when a remote method is disabled and remote it from the Swagger UI. | ||
| loopbackApplication.on('remoteMethodDisabled', function() { |
There was a problem hiding this comment.
Indent comment to line up with loopbackApplication...
There was a problem hiding this comment.
@superkhau It seems like this whole file uses this style of indentation. I'm not sure it's the convention or not, so, I just followed. Should I change the indentation of the whole file?
There was a problem hiding this comment.
Hm...it's probably the linter that messed up. I would appreciated if you could help fix it in a second commit (or another PR if you prefer). It is definitely not convention, it looks messed up all over the place lol.
61c3167 to
3d34a65
Compare
|
@superkhau I've fixed them and squashed the commits. Anyway, currently, I just use the loopback dependency directly from strongloop/loopback#2266. What version of loopback in package.json should be if it's not tagged as a new version yet? |
|
The patch contains quite few unrelated indentation changes. I'd like to wait with landing it until #158 is landed first. |
|
Hey @supasate, sorry for the trouble, could you please rebase your patch on top of the current master? |
I ask him to do it in a separate commit (in one of the comments) so I can review it easier. @supasate Please resolve the conflicts now that #158 has been merged and we'll get it merged in. |
…ized Signed-off-by: Supasate Choochaisri <supasate.c@gmail.com>
3d34a65 to
ff60f8b
Compare
|
@bajtos @superkhau Should be alright now. |
|
LGTM. Thanks for the contribution! ;) |
This PR is for strongloop/loopback#686 to make the explorer registering a remoteMethodDisabled event that is fired from PR strongloop/loopback#2266. The explorer will update a swagger object when getting this event to hide the disabled remote method.